Skip to content

Conversation

@kyogendra08
Copy link

what

These are the problems encountered :

Replication role name is hardcoded to format("%s-replication", local.bucket_name), which breaks org naming policies.
With SSE-KMS buckets, replication needs KMS permissions that aren’t added by default in the replication IAM role.

why

Add variable s3_replication_iam_role_name to customize the role name
When sse_kms_encrypted_objects is enabled in s3 replication rules, KMS actions are added to the replication role (recursively if multiple buckets and kms keys are mentioned):
eg: kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey*, kms:DescribeKey

references

closes #279

@kyogendra08 kyogendra08 requested review from a team as code owners September 26, 2025 15:33
@mergify mergify bot added the triage Needs triage label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Needs triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Override S3 replication IAM role name + auto-add KMS perms

1 participant